﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;

namespace UmlDesigner.Gui
{
    public partial class CodeGenerationResultsForm : Form
    {
        public CodeGenerationResultsForm()
        {
            InitializeComponent();
            Icon = Properties.Resources.ApplicationIcon;

        }

        internal void ShowResults(string s)
        {
            string[] lines = s.Split("\n".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);

            foreach (string line in lines)
            {
                //Color textCol = Color.Black;
                //int startIdx = resultsRichTextBox.Text.Length;
                //
                //if (line.StartsWith("error", StringComparison.InvariantCultureIgnoreCase))
                //{
                //    textCol = Color.DarkRed;
                //}

                resultsRichTextBox.Text = resultsRichTextBox.Text + line + '\n';
                //resultsRichTextBox.Select(startIdx, line.Length);
                //resultsRichTextBox.SelectionColor = textCol;
            }
        }
    }
}
